<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Service extends Model
{
    use SoftDeletes;

    protected $table = 'service';

    const STATUS = [
        0 => '禁用',
        1 => '启用',
    ];


    public function serviceType()
    {
        return $this->hasMany(ServiceType::class);
    }


    public static function selectOption()
    {
        return self::query()->orderBy('id')->pluck('name', 'id');
    }
}
